<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

  <div id="app">


  </div>
  <!-- 引入React依赖 -->
  <script src="../React/react.development.js"></script>
  <script src="../React/react-dom.development.js"></script>
  <script src="../React/babel.min.js"></script>

  <!-- 编写React代码 -->
  <script type="text/babel">
    class App extends React.Component {
      constructor() {
        super()
        //定义变量
        this.state = {
          message: "Hello World",
        }
      }
      render() {
        return (
          <div>
            <div class="header">
              <h1 title="标题">我是标题</h1>
              <div className="content">
                <h2>我是页面的内容</h2>
                <button>按钮</button>
                <button>+1</button>
                <a href="http://www.baidu.com">百度一下</a>
              </div>
              <div className="footer">
                <p>我是尾部的内容</p>
              </div>
            </div>
          </div>
        )
      }
    }
  </script>

  <script type="text/babel">
    ReactDOM.render(<App />, document.getElementById("app"))
  </script>

</body>

</html>